package com.etc.towers {
import com.etc.Utils;

import flash.display.MovieClip;
import flash.display.Sprite;

public class Tower_mc extends MovieClip {
	private var _head: MovieClip = null;
	private var _body: MovieClip = null;

	public function Tower_mc( hi: Number, ho: Number, bi: Number, bo: Number, l: Number) {
		super();
		addChild( _body = new GunTowerBody_mc(bi,bo) );
		addChild( _head = new GunTowerHead_mc(hi,ho) );

		var tlx: Number = -12, tly: Number = -12;
		// adding level ind
		for( var i:Number = 0; i < l; i++ ){
			var sqr: Sprite = Utils.rect(3,3,hi);
			sqr.x = tlx + (i) * 4;
			sqr.y = tly - 4;
			addChild(sqr);
		}
	}

	public function get head():MovieClip {
		return _head;
	}

	public function set head(value:MovieClip):void {
		_head = value;
	}

	public function get body():MovieClip {
		return _body;
	}

	public function set body(value:MovieClip):void {
		_body = value;
	}
}
}
